package com.liuyi.mybatisplus.plus.condition;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @ClassName : QueryCondition  //类名
 * @Description : 查询实体  //描述
 * @Author : Mr.Fmy  //作者
 * @Date: 2020-07-10 14:06  //时间
 */
public class QueryCondition implements Serializable {


    private String select;

    private LinkedHashMap<String, Object> query;

    private Map<String, String> sort;

    private Integer page;

    private Integer limit;

    public LinkedHashMap<String, Object> getQuery() {
        if (query == null) {
            query = new LinkedHashMap<>();
        }
        return query;
    }


    public Map<String, String> getSort() {
        if (sort == null) {
            sort = new LinkedHashMap<>();
        }
        return sort;
    }

    public void setQuery(LinkedHashMap<String, Object> query) {
        this.query = query;
    }

    public void setSort(Map<String, String> sort) {
        this.sort = sort;
    }

    public String getSelect() {
        return select;
    }

    public void setSelect(String select) {
        this.select = select;
    }

    public Integer getPage() {
        return page == null ? 1 : page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit == null ? 15 : limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }
}
